#include <stdio.h>
#include <stdlib.h>

int un_gval;
int init_gval=100;

int main()
{
    printf("code addr: %p\n", main); //用main函数代表代码区的地址
    const char* str = "hello linux";
    printf("read only char addr: %p\n", str);
    printf("init global value addr: %p\n", &init_gval);
    printf("uninit global value addr: %p\n", &un_gval);
    char* heap1 = (char*)malloc(100);
    printf("heap addr: %p\n", heap1);
    printf("stack addr: %p\n", &str);
    return 0;
}

